package tweeks.user.persistence;

import java.util.List;
import java.util.Map;

import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.stereotype.Repository;

import tweeks.user.domain.Group;
import tweeks.user.domain.Permission;

@Repository("UserMapper")
public interface UserMapper {
	void createUser(UserDetails user);
	void createUserGroup(UserDetails user);
	void updateUser(UserDetails user);
	void updateUserGroup(UserDetails user);
	void deleteAll();
	void deleteUser(String id);
	void deleteUserGroup(String id);
	List<UserDetails> loadUserByUsername(String username);
	List<UserDetails> selectUser(UserDetails user);
	List<Group> selectGroup(Group group);
	List<Permission> selectPermission(Permission permission);
	List<Map<String, String>> loadGroupAuthorities(String username);
}